#!/bin/bash
logfile=/home/ZCIPClient/log/sy_update.log
yum -y install git >> $logfile 2>&1
username='cloudtest'
email='cloudtest@iwhalecloud.com'
git config --global user.name $username >> $logfile 2>&1
git config --global user.email $email >> $logfile 2>&1
pip3 install GitPython~=3.0.5 -i https://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com >> $logfile 2>&1
pip3 install requests~=2.22.0 -i https://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com >> $logfile 2>&1
pip3 install argparse==1.1 -i https://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com >> $logfile 2>&1
workdir=$(cd $(dirname $0); pwd)
python3 $workdir/synchronous_update.py "$@" >> $logfile 2>&1